﻿using System.ComponentModel;

namespace ZhiHeng.OneCard.WpfClient.ViewModel
{
    public class WindowsInfoViewModel : INotifyPropertyChanged
    {
        public WindowsInfoViewModel(string ControlName, string ControlWidth, string ControlHeight, string ControlImg, string ControlState, string UserName)
        {
            this.ControlName = ControlName;
            this.UserName = UserName;
            this.ControlImg =ControlImg ;
            this.ControlState = ControlState;
            this.ControlWidth = ControlWidth;
            this.ControlHeight = ControlHeight;

        }
        private string _controlName;
        public string ControlName { get{return _controlName;} set { _controlName = value; this.NotifyPropertyChanged("ControlName"); } }
        private string _controlWidth;
        public string ControlWidth { get { return _controlWidth; } set { _controlWidth = value; this.NotifyPropertyChanged("ControlWidth"); } }
        private string _controlHeight;
        public string ControlHeight { get { return _controlHeight; } set { _controlHeight = value; this.NotifyPropertyChanged("ControlHeight"); } }
        private string _controlImg;
        public string ControlImg { get { return _controlImg; } set { _controlImg = value; this.NotifyPropertyChanged("ControlImg"); } }
        private string _controlState;
        public string ControlState { get { return _controlState; } set { _controlState = value; this.NotifyPropertyChanged("ControlState"); } }
        private string _userName;
        public string UserName { get { return _userName; } set { _userName = value; this.NotifyPropertyChanged("UserName"); } }
        public event PropertyChangedEventHandler PropertyChanged;

        protected void NotifyPropertyChanged(string propertyName)
        {
            var propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

    }
}
